/*function getHotThreads(callback){
	$.ajax({
		url:"threads/readHotThreads.do",
		type:"POST",
		dataType:"json",
		success: callback(jsonData),
	});	
}*/

getHotThreads(callback);

function callback(jsonData){
	var hotThreads = jsonData;
	for(index in hotThreads){
		var threads = hotThreads[index];
		var eleP = $("<p class='list-group-item'>");
		var eleA = $("<a>");
		eleA.attr("href", "threads/"+threads.threadsID+"/read.do");
		eleA.text(threads.threadsName);
		eleP.append(eleA);
		$("#hotThreads").append(eleP);
	}
}
//var hotThreads = "${!empty hotThreads}";
//$("#hotThreads")
$("input[type='button']").eq(0).on("click", function(){
//	$(this).parent()[0].submit();
	var params = makeParams(["threads_ID", "reply_content"]);
	$.ajax({
		url:"reply/pub.do",
		data:params,
		dataType:"json",
		success:function(jsonData){
			console.info(jsonData);
		},
	});
});
